<ion-view view-title="入库" hide-back-button="true">
    <ion-nav-buttons side="left">
        <button ng-click="goBack();" class="button-clear icon ion-ios-arrow-left" style="color:#999999;"></button>
    </ion-nav-buttons>

    <ion-content style="z-index: -1">
        <div class="border-bottom" style="height: 90px">
            <img src="img/barcode.png" style="height: 80px;padding-left: 106px">
        </div>
        <div class="row border-bottom margin-top-5 padding-left-15">
        <span class="input-label text-align-l width-100px">
          <span style="padding-top: 5px;font-size: 14px; ">条码</span>
        </span>
            <input type="number" maxlength="20" class="col" placeholder="请填写条码编号" ng-model="data.barcode" ng-blur="getByCode()"
                   style="padding-top: 5px;font-size: 14px">
        </div>
        <div class="row border-bottom margin-top-5 padding-left-15">
        <span class="input-label text-align-l width-100px">
          <span style="padding-top: 5px;font-size: 14px; ">码表编号</span>
        </span>
            <input type="number" maxlength="20" class="col" placeholder="请填写码表编号" ng-model="data.number"
                   style="padding-top: 5px;font-size: 14px">
        </div>
        <div class="row border-bottom margin-top-5 padding-left-15" ng-click="goSupplier('supplier')">
        <span class="input-label text-align-l width-100px">
          <span style="padding-top: 5px;font-size: 14px; ">供应商</span>
        </span>
            <div class="color-text-s inline-block"
                 style="padding-top: 7px;font-size: 14px">
                <div class="float-l">{{data.supplier?data.supplier:'请选择'}}</div>
                <div class="icon ion-ios-arrow-right absolute" style="right: 14px"></div>
            </div>
        </div>
        <div class="row border-bottom margin-top-5 padding-left-15" ng-click="goSupplier('paper')">
        <span class="input-label text-align-l width-100px">
          <span style="padding-top: 5px;font-size: 14px; ">纸种</span>
        </span>
            <div class="color-text-s inline-block"
                 style="padding-top: 7px;font-size: 14px">
                <div class="float-l">{{data.paper?data.paper:'请选择'}}</div>
                <div class="icon ion-ios-arrow-right absolute" style="right: 14px"></div>
            </div>
        </div>
        <div class="row border-bottom margin-top-5 padding-left-15" ng-click="goSupplier('weight')">
        <span class="input-label text-align-l width-100px">
          <span style="padding-top: 5px;font-size: 14px; ">克重</span>
        </span>
            <div class="color-text-s inline-block"
                 style="padding-top: 7px;font-size: 14px">
                <div class="float-l">{{data.weight?data.weight:'请选择'}}</div>
                <div class="icon ion-ios-arrow-right absolute" style="right: 14px"></div>
            </div>
        </div>
        <div class="row border-bottom margin-top-5 padding-left-15" ng-click="goSupplier('specification')">
        <span class="input-label text-align-l width-100px">
          <span style="padding-top: 5px;font-size: 14px; ">规格</span>
        </span>
            <div class="color-text-s inline-block"
                 style="padding-top: 7px;font-size: 14px">
                <div class="float-l">{{data.specification?data.specification:'请选择'}}</div>
                <div class="icon ion-ios-arrow-right absolute" style="right: 14px"></div>
            </div>
        </div>
        <div class="row border-bottom margin-top-5 padding-left-15">
        <span class="input-label text-align-l width-100px">
          <span style="padding-top: 5px;font-size: 14px; ">重量(kg)</span>
        </span>
            <input type="number" maxlength="20" class="col" placeholder="请填写重量" ng-model="data.kg"
                   style="padding-top: 5px;font-size: 14px">
        </div>
        <div style="height: 120px"></div>


    </ion-content>
    <div class="width-100 height-100" style="background: rgba(0,0,0,0.3);position: absolute;z-index: -1"
         ng-if="ifShow"></div>
    <div ng-if="ifShow" style="margin-top: 50%;background: white">
        <div style="width: 100%;height: 40px;box-sizing: border-box;text-align: center;color: #454545;">
            <div style="width: 100%;height: 40px">
                <div style="width: 100%;height: 40px;">
                    <div style="height: 40px;line-height: 40px;float: left;width: 25%">码表</div>
                    <div style="height: 40px;line-height: 40px;float: left;width: 30%">条码</div>
                    <div style="height: 40px;line-height: 40px;float: left;width: 25%">重量</div>
                    <div style="height: 40px;line-height: 40px;float: left;width: 20%">操作</div>
                </div>
            </div>
        </div>

        <div style="overflow: auto;max-height: 266px">
            <div style="width: 100%;height: 52px;box-sizing: border-box;text-align: center;color: #ababab;">
                <div style="width: 100%;height: 52px;" ng-repeat="item in inputList track by $index">
                    <div style="height: 52px;line-height: 52px;float: left;font-size: 12px;width: 25%"
                         ng-bind="item.number">11111111111
                    </div>
                    <div style="height: 52px;line-height: 52px;float: left;font-size: 12px;width: 30%"
                         ng-bind="item.barcode">11111111111
                    </div>
                    <div style="height: 52px;line-height: 52px;float: left;font-size: 12px;width: 25%"
                         ng-bind="item.kg">100
                    </div>
                    <div style="float: left;margin: 12px 15px;border: solid 1px black;font-size: 12px;border-radius: 5px;padding: 1px 3px;"
                         ng-click="ifShowList($index)">
                        编辑
                    </div>
                </div>
            </div>
        </div>

        <div style="margin-left: auto;margin-right: auto;width: 36px;font-size: 18px;padding: 10px 0;"
             ng-click="inStock()">确认
        </div>
    </div>

    <ion-footer-bar ng-if="!ifShow">
        <div class="text-align-c" style="width: 100%;padding-top: 2px;">
            <button class=" button button-small button-assertive"
                    style="width: 25%;margin-right: 3%;background-color: #BDE6E2;border-radius: 20px">
                取消
            </button>
            <button class=" button button-small button-balanced" ng-click="saveInputList()"
                    style="width: 25%;margin-right: 3%;background-color: #69C5BD;border-radius: 20px">
                保存
            </button>
            <button class=" button button-small button-balanced" ng-click="confirmInput()"
                    style="width: 25%;background-color: #69C5BD;border-radius: 20px">
                确认提交
            </button>
        </div>
    </ion-footer-bar>
</ion-view>
